#include "stdafx.h"
#include "player.h"

#define PLAYER_SPEED 3

CPlayer::CPlayer(float x, float y)
    : m_speed(PLAYER_SPEED)
    , m_x(x)
    , m_y(y)
{    
}

CPlayer::~CPlayer()
{

}

void CPlayer::Up()
{
    m_y -= m_speed;
}

void CPlayer::Down()
{
    m_y += m_speed;
}

void CPlayer::Left()
{
    m_x -= m_speed;
}

void CPlayer::Right()
{
    m_x += m_speed;
}

float CPlayer::GetX()
{
    return m_x;
}

float CPlayer::GetY()
{
    return m_y;
}

int CPlayer::GetSpeed()
{
    return m_speed;
}

void CPlayer::SetPos(float x, float y)
{
    m_x = x;
    m_y = y;
}

void CPlayer::SetSpeed(int nSpeed)
{
    m_speed = nSpeed;
}
